package com.example.bootmeetingservice.service.Impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.bootmeetingservice.mapper.MeetintMapper;
import org.example.pojo.Meeting;
import org.example.pojo.User;
import org.example.service.MeetingService;
import org.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MeetingServiceImpl implements MeetingService {
    @Autowired
    MeetintMapper meetintMapper;

    @Reference
    UserService userService;

    @Override
    public Meeting getMeetingMessageById(Integer id) {
        User user=userService.getUserById(1);
        Meeting meeting=meetintMapper.getMeetingById(id);
        meeting.setName(user.getName());
        return meeting;
    }
}
